package piano;
/*
 * Author: rendy.jr
 * Date: Jun 10, 2011
 * 6.005 Elements of Software Construction
 * Rendy Bambang Junior
 * rendy.jr@gmail.com
 * 
 * ActionElement represent an action and all information that must be recorded
 * to play keys
 */
public class ActionElement {
	//enumerate type of action
	public enum ActionType {
		ADD,
		REMOVE
	}
	
	//action attribute
	private ActionType action;
	private char key;
	private long timestamp;
	
	//action constructor with defined action, key in char, and time stamp in millisecond
	public ActionElement(ActionType action, char key, long timestamp){
		this.action = action;
		this.key = key;
		this.timestamp = timestamp;
	}
	
	//action getter
	public ActionType getAction(){
		return action;
	}
	
	//key getter
	public char getKey(){
		return key;
	}
	
	//time getter
	public long getTimeStamp(){
		return timestamp;
	}
}
